<h2 mat-dialog-title>新增快捷方式</h2>
<mat-dialog-content> 
    <mat-form-field class="full-width">
      <mat-label>名称</mat-label>
      <input type="text" matInput [formControl]="nameFormControl" placeholder="请输入名称">
      @if (!nameFormControl.hasError('required')) {
        <mat-error>请输入名称</mat-error>
      }  
    </mat-form-field>
    <br />
    <mat-form-field class="full-width">
        <mat-label>路径</mat-label>
        <input type="text" matInput [formControl]="pathFormControl" placeholder="请输入路径">
        @if (!pathFormControl.hasError('required')) {
          <mat-error>请输入路径</mat-error>
        }  
      </mat-form-field>
</mat-dialog-content>
<mat-dialog-actions>
  <button mat-button (click)="onNoClick()">取消</button>
  <button mat-button (click)="onYesClick()" [disabled]="!nameFormControl.valid" cdkFocusInitial>确定</button>
</mat-dialog-actions>
